1. Field of the Invention
The present invention relates to an image processing apparatus and a control method therefor.
2. Description of the Related Art
An image processing apparatus that segments an input image into monochrome areas (areas of a monochrome image) and color areas (areas of a color image), and performs γ correction individually for the monochrome area and the color area has been proposed. For example, an image processing apparatus that performs γ correction specified in digital imaging and communication in medicine (DICOM) Part 14 (hereafter called “DICOM γ correction”) on a monochrome area and γ correction with γ=2.2 (hereafter called “2.2 γ correction”) on a color area has been proposed. If this image processing apparatus is used in the case of displaying such a monochrome image as an X-ray image and such a color image as an endoscope image, DICOM γ correction is performed on the monochrome image and 2.2 γ correction is performed on the color image, so that both images can be displayed in appropriate gradation.
In some cases, some color pixels, such as a color comment, may exist in a monochrome image (e.g. X-ray image). In the same way, some monochrome pixels may exist in a color image. Therefore if each image is determined whether the image is a monochrome area or color area for each pixel, the color pixels in a monochrome image may be misjudged as a color area, or monochrome pixels in a color image may be misjudged as a monochrome area. To prevent this error, a method for determining a monochrome area or a color area for each segment area acquired by segmenting an image area has been proposed (Japanese Patent Application Laid-Open No. 2003-244469).